package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-14
 */
public class AnnotationsItem implements Sequenceable, Serializable {

    @SerializedName("playerAnnotationsExpandedRenderer")
    private PlayerAnnotationsExpandedRenderer playerAnnotationsExpandedRenderer;

    public static final Sequenceable.Producer<AnnotationsItem> CREATOR = new Producer<AnnotationsItem>() {
        @Override
        public AnnotationsItem createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            AnnotationsItem annotationsItem = new AnnotationsItem();
            annotationsItem.unmarshalling(parcel);
            return annotationsItem;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.playerAnnotationsExpandedRenderer);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.playerAnnotationsExpandedRenderer);
        return true;
    }

    @Override
    public String toString() {
        return "AnnotationsItem{" +
                "playerAnnotationsExpandedRenderer = '" + playerAnnotationsExpandedRenderer + '\'' +
                "}";
    }

    public PlayerAnnotationsExpandedRenderer getPlayerAnnotationsExpandedRenderer() {
        return playerAnnotationsExpandedRenderer;
    }

    public void setPlayerAnnotationsExpandedRenderer(PlayerAnnotationsExpandedRenderer playerAnnotationsExpandedRenderer) {
        this.playerAnnotationsExpandedRenderer = playerAnnotationsExpandedRenderer;
    }
}
